import { SpecsType } from '@/modules/businessModule/specsType/assets/specsType.entity';
import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Spec {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  @ApiProperty({ description: '规格属性名称' })
  specName: string;

  @ApiProperty({ description: '规格属性类型', type: () => SpecsType })
  @ManyToOne(() => SpecsType, (specsType) => specsType.specs)
  specsType: SpecsType;
}
